<div class="row">
	<ol class="breadcrumb">
		<li><a href="<{url c='admin/category' a='index'}>">分类管理</a></li>
		<{if !empty($info)}>
		<li class="active">编辑分类：<{$info.category_name}></li>
		<{else}>
		<li class="active">新建分类</li>
		<{/if}>
	</ol>
</div>
<div class="row">
	<form class="form-horizontal" action="<{url c='admin/category' a='submit'}>" method="post">
		<input type="hidden" name="category_id" value="<{if !empty($info)}><{$info.category_id}><{/if}>">
		<div class="form-group">
			<label for="inputTitle" class="col-sm-2 control-label">分类名称</label>
			<div class="col-sm-6">
				<input type="text" name="category_name" value="<{if !empty($info)}><{$info.category_name}><{/if}>" class="form-control" id="inputTitle" placeholder="分类名称">
			</div>
		</div>
		<{if !empty($templates)}>
		<div class="form-group">
			<label for="selectTemplate" class="col-sm-2 control-label">模板选择</label>
			<div class="col-sm-6">
				<select name="template_id" class="form-control" id="selectTemplate">
					<option value="0"></option>
					<{foreach $templates as $t}>
					<option value="<{$t.template_id}>" <{if !empty($info) && $info.template_id == $t.template_id}> selected<{/if}>><{$t.template_name}></option>
					<{/foreach}>
				</select>
			</div>
		</div>
		<{/if}>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-8">
				<button type="submit" class="btn btn-default">提交</button>
			</div>
		</div>
	</form>
</div>